import base from './base'
import wepy from 'wepy'
/**
 * 埋点相关
 */

export default class log extends base {
  // 分享记录
  static shareRecord(data) {
    let url = `${this.baseUrl}/study-api/v2/buriedPoint/savePageSource.post`
    return this.post(url, data)
  }
  // v2.1埋点 全部埋点集合
  static log(params) {
    let url = this.urlMap.prod + '/v2/buriedPoint/saveBurjedProint.post'
    let openId = wepy.getStorageSync('open_id')
    let initParams = {
      'Type': 1,
      openId,
      'dataType': '',
      'welcomePage': '',
      'loginPage': '',
      'intentionPage': '',
      'homePage': '',
      'lectureList': '',
      'lectureDetails': '',
      'myPage': '',
      'downloadList': '',
      'downloadDetails': '',
      'aiPage': '',
      'evaluationPage': ''
    }
    return this.post(url, Object.assign(initParams, params))
  }
}
